package com.gitee.feizns.webtemplate.commons.exception;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.http.HttpStatus;

import java.util.Map;

/**
 * @author feizns
 * @since 2019/5/13
 */
@Data
@ConfigurationProperties(prefix = "exception.config")
public class ExceptionProperties {

    /**
     * debug 模式，（会打印出异常的堆栈信息）
     */
    private boolean debug = true;

    /**
     * 在遇到未知异常时的响应码
     */
    private HttpStatus unknownStatus = HttpStatus.INTERNAL_SERVER_ERROR;

    /**
     * 默认的响应状态
     */
    private HttpStatus defaultStatus = HttpStatus.OK;

    /**
     * 数据校验的响应码
     */
    private HttpStatus validateStatus = HttpStatus.BAD_REQUEST;

}
